package com.edu.dao.impl;

import com.as.util.DBUtil;
import com.edu.dao.BusinessDao;
import com.edu.domain.Business;

import java.util.List;

public class BusinessDaoImpl implements BusinessDao {
    @Override
    public List<Business> listBusinessByOrderTypeId(int orderTypeId) {
        String sql="select *from business where orderTypeId=?";
        return DBUtil.executeQuery(Business.class,sql,orderTypeId);
    }

    @Override
    public Business getBusinessById(int businessId) {
        String sql="SELECT *from business where businessId=?";
        return DBUtil.executeOne(Business.class,sql,businessId);
    }
}
